#include "list.hpp"

namespace mystl {

list::list(int _val) {
    head = new list_node(_val);
}

list::~list() {
    list_node* node;
    while(head) {
        node = head->next;
        delete(head);
        head = node;
    }
}

int list::get_head() {
    return head->val;
}

};